import { SysUserId, Title, Entity, CreateDate, UpdateDate, PrimaryUuid, Role, RolePermission, Boolean, CreateUserId} from '@sker/core'
/**
 * 会员组
 */
@Entity({
    name: 'wx_mgroup'
})
export class WxMGroup { 
    static title: string = `会员组`;
    static resource: string = `wx_mgroup`;

    @PrimaryUuid({
        primaryKeyConstraintName: "PK_WX_MGROUP_ID"
    })
    id!: string;

    @Title({comment: '组名'})
    title!: string;

    @Role({
        comment: '角色',
        nullable: true,
        default: ''
    })
    role!: string;

    @RolePermission({comment: '角色配置', nullable: true})
    permission!: object;

    @Boolean()
    is_default: boolean;

    /**
     * 后台操作员
     */
    @CreateUserId()
    create_uid!: string;

    @CreateDate({
        comment: '创建日期'
    })
    create_date!: Date;

    @UpdateDate({
        comment: '更新日期'
    })
    update_date!: Date;
}